# Author:	gong_libin
# Date:		2015_02_07

CC = g++
CFLAGS = -Wall -O2
#CFLAGS += -D_GT_DEBUG_

GT_ENV = /root/GtDns
GT_BIN = $(GT_ENV)/bin
GT_INC = $(GT_ENV)/inc
GT_SRC = $(GT_ENV)/src
GT_OBJ = $(GT_ENV)/obj
GT_TST = $(GT_ENV)/test

GT_GLIB = /usr/lib
GT_GINC = /usr/include/GtInc

export CC
export CFLAGS

export GT_ENV
export GT_BIN
export GT_INC
export GT_SRC
export GT_OBJ
export GT_TST

export GT_GLIB
export GT_GINC

.PHONY: bin src obj test

all: bin src test

install: bin obj test
objects: bin src clear

bin:
	if test -d $(GT_BIN); then true; else mkdir $(GT_BIN); fi;

src:
	$(MAKE) -C src

test:
	$(MAKE) -C test

clear:
	rm -rf $(GT_SRC)
	rm -rf $(GT_BIN)

clean:
	$(MAKE) clean -C test
	$(MAKE) clean -C src
	rm -rf $(GT_BIN)
